3D Graphics Programming with QuickDraw 3D 1.5.4
Previous | QD3D Book | Overview | Chapter Contents | Next |
QuickDraw 3D provides routines for creating and managing handle storage objects.
You can use the Q3HandleStorage_New function to create a new handle storage object.
TQ3StorageObject Q3HandleStorage_New (
Handle handle,
unsigned long validSize);
The Q3HandleStorage_New function returns, as its function result, a new handle storage object associated with the buffer specified by the handle and validSize parameters. Your application must not access that buffer until the associated storage object is closed or disposed of. If Q3HandleStorage_New cannot create a new storage object, it returns the value NULL . If you pass the value NULL in the handle parameter, QuickDraw 3D allocates a buffer of the specified size and later disposes of that buffer when the associated storage object is closed or disposed of.
You can use the Q3HandleStorage_Get function to get information about a handle storage object.
TQ3Status Q3HandleStorage_Get (
TQ3StorageObject storage,
Handle *handle,
unsigned long *validSize);
The Q3HandleStorage_Get function returns, in the handle and validSize parameters, the handle and size of the block of memory currently associated with the handle storage object specified by the storage parameter. Note that the returned handle is a handle to the storage object's data, not of a copy of that data.
You can use the Q3HandleStorage_Set function to set information about a handle storage object.
TQ3Status Q3HandleStorage_Set (
TQ3StorageObject storage,
Handle handle,
unsigned long validSize);
The Q3HandleStorage_Set function sets the buffer location and size of the handle storage object specified by the storage parameter to the values specified in the handle and validSize parameters. If you pass the value NULL in the handle parameter, QuickDraw 3D allocates a buffer of the specified size and later disposes of that buffer when the associated storage object is closed or disposed of. If you pass NULL in handle and 0 in validSize , QuickDraw 3D allocates a buffer of a private default size.
Previous | QD3D Book | Overview | Chapter Contents | Next |